Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Implement proper line split + tests - #1544

Merged
Mikhail Arkhipov (MikhailArkhipov) merged 4 commits into
masterfrom
1543-1
Sep 16, 2019
Merged

Mikhail Arkhipov (MikhailArkhipov) merged 4 commits into
masterfrom
1543-1

Conversation

@MikhailArkhipov

Copy link
Copy Markdown

Fixes #1543

  • Changes were applied incorrectly. Changes across line spans caused buffer corruption. Typical example is undoing multiple changes via fast Ctrl+Z.
  • Simplified change handling: per LSP, any sequence applies
 * The actual content changes. The content changes describe single state changes
 * to the document. So if there are two content changes c1 and c2 for a document
 * in state S then c1 move the document to S' and c2 to S''.

and we can now handle this since line splits update after each change.

  • Implement new line location without creating extra strings
  • Add tests for new lines as well as for multi-line edits.
  • Remove unused flags
  • Remove change reordering/versions.

Comment thread src/Analysis/Ast/Impl/Documents/DocumentBuffer.cs Outdated
Comment thread src/LanguageServer/Impl/LanguageServer.cs
Jake Bailey (jakebailey) pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
* Implement proper line split + tests

* Out of order test

* Rename method

* Unused code
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange parsing errors

3 participants